# Contributor: Saijin-Naib <Saijin-Naib_package-maintenance@outlook.com>
# Maintainer: Saijin-Naib <Saijin-Naib_package-maintenance@outlook.com>
pkgname=warpinator
pkgver=1.8.3
pkgrel=0
pkgdesc="Share files across the LAN"
url="https://github.com/linuxmint/warpinator"
arch="noarch"
license="GPL-3.0-or-later"
depends="
	bubblewrap
	py3-cairo
	py3-cryptography
	py3-google-api-core
	py3-grpcio
	py3-landlock
	py3-netifaces
	py3-pynacl
	py3-qrcode
	py3-setproctitle
	py3-setuptools
	py3-xapp
	py3-zeroconf
	xapp
	"
makedepends="
	appstream-dev
	gettext-dev
	gobject-introspection
	grpc-dev
	itstool
	meson
	polkit-dev
	python3-dev
	py3-protobuf
	xapp-dev
	"
subpackages="
	$pkgname-lang
	$pkgname-nemo
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/warpinator/archive/refs/tags/$pkgver.tar.gz"
options="!check" # No upstream testsuite defined
build() {
	meson setup \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		-Dbundle-grpc=false \
		-Dbundle-landlock=false \
		-Dbundle-zeroconf=false \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

nemo() {
	pkgdesc="$pkgdesc (nemo integration)"
	install_if="$pkgname=$pkgver-r$pkgrel nemo"

	amove usr/share/nemo
}

sha512sums="
e8db3fb97bb5b17ad8e91fb48345f2a582382468281ad63776dc69fd703b3d4deedab0d6278c2902d417ae0bf32a8a46cbbdd84b9a2bd919c530967e7e9d9eb4  warpinator-1.8.3.tar.gz
"
